﻿@model IEnumerable<KCMS.Web.Models.NewsViewModel>

@{
    ViewBag.Title = "Новости";
}

<h2>Новости</h2>
<ul id="news-list">
        @foreach (var item in Model)
        {
            <li>
                <div class="news-title">
                    <span class="news-date">@Html.DisplayFor(modelItem => item.Date)</span>
                    <br>
                    <a href="@Url.Action("Show", "News", new { code = item.Code })">
                        @Html.DisplayFor(modelItem => item.Title)
                    </a>
                </div>
                <div class="news-description">
                    @Html.Raw(item.Description)
                </div>
                @Html.ActionLink("Подробнее", "Show", "News", new { code = @item.Code }, null)
            </li>
        }
    </ul>
